<template>
  <van-tabbar v-model="active" bind:change="onChange">
    <van-tabbar-item icon="home-o" @click="redirect('/home')">分类</van-tabbar-item>
    <van-tabbar-item icon="manager-o" @click="redirect('/me')">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  name: "Menu",
  data(){
    return {
      active:0,
    }
  },
  methods:{
    redirect(path){
      this.$router.push(path)
    },
    onChange(event){
      this.setData({ active: event.detail });
    }
  }
}
</script>

<style scoped>

</style>